import request from '@/utils/request'

// 查询角色权限列表
export function operationRoleList(query) {
  return request({
    url: '/system/operationRole/roleList',
    method: 'get',
    params: query
  })
}
// 查询运营账号列表
export function listOperationAccount(query) {
  return request({
    url: '/system/operationAccount/list',
    method: 'get',
    params: query
  })
}

// 查询运营账号详细
export function getOperationAccount(id) {
  return request({
    url: '/system/operationAccount/' + id,
    method: 'get'
  })
}

// 新增运营账号
export function addOperationAccount(data) {
  return request({
    url: '/system/operationAccount',
    method: 'post',
    data: data
  })
}

// 重置密码
export function resetPassword(data) {
  return request({
    url: '/system/operationAccount/resetPassword',
    method: 'post',
    data: data
  })
}

// 修改运营账号
export function updateOperationAccount(data) {
  return request({
    url: '/system/operationAccount',
    method: 'put',
    data: data
  })
}

// 删除运营账号
export function delOperationAccount(id) {
  return request({
    url: '/system/operationAccount/' + id,
    method: 'delete'
  })
}
